package extend;


class Animal {
    public int age;
    public String name;

    {
        System.out.println("Animal的实例代码块");
    }
    static {
        System.out.println("Animal的静态代码块");
    }

    public Animal() {
        System.out.println("Animal的构造方法");
    }
}
class Cat extends Animal{

    public Cat() {
        System.out.println("Cat的构造方法");
    }
    {
        System.out.println("Cat的实例代码块");
    }
    static {
        System.out.println("Cat的静态代码块");
    }

}
public class Test {
    public static void main(String[] args) {
        Cat cat=new Cat();
        System.out.println("============");
        Cat cat1=new Cat();
    }
}
